#define _CRT_SECURE_NO_WARNINGS
//https://www.nowcoder.com/practice/1277c681251b4372bdef344468e4f26e?tpId=13&&tqId=11202&rp=6&ru=/activity/oj&qru=/ta/coding-interviews/question-ranking

#include<iostream>

using namespace std;
class Solution {
public:
    int StrToInt(string str) {
        int ret = 0;
        int power = 1;
        for (int i = str.size() - 1; i >= 0; i--)
        {
            if ((str[i] <= '0' || str[i] >= '9') && str[i] != '+' && str[i] != '-')
            {
                return 0;
            }
            if (str[i] == '+')
                return ret;
            else if (str[i] == '-')
                return -ret;
            ret += (int)(str[i] - '0') * power;
            power *= 10;
        }
        return ret;
    }
};

int mian()
{

}